package common;

/**
 * This class represents system user with teacher's privileges.
 *
 */
public class Teacher extends User{

	/**
	 * 
	 */
	private static final long serialVersionUID = 4265790948821152931L;

	/**
	 * Default constructor
	 */
	public Teacher() {
		super();
	}

	/**
	 * String representation of the object
	 */
	public String toString(){
		if (getFirstname() == null && getLastname() == null)
			return getLogin();
		if (getFirstname() != null && getLastname() != null)
			return getFirstname() + " " + getLastname();
		if (getFirstname() != null && getLastname() == null)
			return getFirstname();
		else
			return getLastname();
	}
}
